package com.cxm.report.model;

import lombok.Getter;

/**
 * @author scl.BlueOcean
 * @version 1.0
 * @date 2018年07月05 11:15
 * @description
 */
public interface IReport {
    String SUCCESS = "0";
    String NO_RECORD = "102";
    String OVER_TIME = "105";
    String FAILED = "103";
    String WEI_HU = "1031";
    String OVER_TIME_GIVE_UP = "1051";

    enum Type{
        BRAND("品牌分析报表",1,"brandReport"),
        CHANNEL("渠道分析报表",2,"channelReport"),
        EFFICIENCY("效率分析报表",3,"efficientReport"),
        CHANNEL_BRAND("渠道品牌报表",4,"channelBrandReport");
        @Getter
        private String title;
        @Getter
        private int type;
        @Getter
        private String template;

        Type(String title, int type,String template) {
            this.title = title;
            this.type = type;
            this.template = template;
        }
        public static Type getByCode(int code){
            Type[] types = values();
            for (Type t : types) {
                if (t.getType() == code){
                    return t;
                }
            }
            return null;
        }
    }
    interface ScopeType{
        String DAY="1";
        String WEEK="2";
        String MONTH="3";
        String YEAR="4";
        String TIME_SCOPE="0";
    }
}
